package com.xbongbong.paas.call;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.field.FieldAttrEntity;
import com.xbongbong.paas.pojo.DetaPhonePojo;
import com.xbongbong.paas.pojo.vo.CallCenterModuleVO;
import com.xbongbong.paas.pojo.vo.IsActiveAliyunCallVO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.formexplain.pojo.dto.HandlerExplainDTO;

import java.util.List;
import java.util.Map;

/**
 * @author 吴峰
 * @date 2021/12/20 18:25
 */
public interface CallCenterService {

    /**
     *
     * @param corpid
     * @param userId
     * @return com.xbongbong.paas.pojo.vo.IsActiveAliyunCallVO
     * @author 吴峰
     * @date 2021/12/20 18:29
     * @throws XbbException
     */
    IsActiveAliyunCallVO isActiveAliyunCall(String corpid, String userId) throws XbbException;
    /**
     *
     * @param corpid
     * @param userId
     * @return boolean
     * @author 吴峰
     * @date 2021/12/20 18:26
     * @throws XbbException
     */
    boolean isOpenCallAndAgent(String corpid, String userId) throws XbbException;

    /**
     *
     * @param corpid
     * @param userId
     * @return com.xbongbong.paas.pojo.vo.CallCenterModuleVO
     * @author 吴峰
     * @date 2021/12/20 18:26
     * @throws XbbException
     */
    CallCenterModuleVO module(String corpid, String userId) throws XbbException;
    
    /**
     * 
     * @param dataList
     * @param businessType
     * @param corpid
     * @param explainMap
     * @param handlerExplainDTO
     * @return java.util.List<com.xbongbong.paas.pojo.DetaPhonePojo>
     * @author 吴峰
     * @date 2021/12/20 19:24
     * @throws XbbException       
     */
    List<DetaPhonePojo> cusCallPhone(JSONObject dataList, Integer businessType, String corpid, Map<String, FieldAttrEntity> explainMap, HandlerExplainDTO handlerExplainDTO) throws XbbException;

    /**
     * 移动端
     * 校验当前用户对应的公司是否开启呼叫中心并且是坐席用户(对应的呼叫中心功能模块是否开放,坐席用户开放模块)
     * 获取当前开启的呼叫平台对应的模块权限
     * @return 开通了呼叫中心并且是坐席：true 没有开通呼叫中心或是非坐席：false
     * @param corpid 公司id
     * @param userId 用户ID
     * @throws XbbException 业务异常
     * @author youli.chen
     * @version v1.0
     * @since v1.0
     */
    boolean isOpenCallDingTalk(String corpid, String userId) throws XbbException;
}
